package day007;


/**
 * 斜着打印数组
 */
public class ArrayTest {
    public static void main(String[] args) {

        int[][] nums = {
                {1, 2, 3, 4, 5},
                {6, 7, 8, 9, 10},
                {11, 12, 13, 14, 15},
                {16, 17, 18, 19, 20},
                {21, 22, 23, 24, 25}
        };
        int n = 4;
        for (int l = 0; l <= n; l++) {
            for (int i = 0; i <= n - l; i++) {
                int j = l + i;
                System.out.println("i:" + i);
                System.out.println("j:" + j);
                System.out.println("l:" + l);
                System.out.println(nums[i][j]);
            }
        }
    }
}
